<!-- Breadcrums -->
<?php $this->load->view('helpers/breadcrums.php'); ?>
<!-- Breadcrum -->
<div class="container">
<div id="main">
<div class="row">
<div class="span9">
<div class="w-box-content cnt_a">
<div class="row-fluid">
<div class="span12">
<h1 class="page-header">Shortlist</h1>
<?php if ($success) { ?>
<div class="success alert alert-success"><?php echo $success; ?><img
	src="<?php echo base_url() ?>assets/img/close.png" alt="" class="close" /></div>
<?php } ?> <?php if ($listings) { ?>
<table class="table table-vam table-striped" id="dt_gal">
	<thead>
		<tr>
			<th>Image</th>
			<th>Project Name</th>
			<th>Price</th>
			<th>Size</th>
			<th>Action</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
	<?php
	$count = 0;
	foreach ($listings as $key => $product) {
		$count++;
		$is_odd_even = $count % 2 == 0 ? 'even' : 'odd';
		$media = $this->mdl_listingmapmodel->get_media($product['listingid'], "Cover", 1);
		?>
		<tr class="<?php echo $is_odd_even; ?>">
			<td style="width: 60px"><?php if(isset($media->FileName) && isset($media->FileExtension)) { ?>
			<a href="<?php echo $product['href']; ?>"
				title="<?php echo $product['name']; ?>" class="thumbnail"> <img
				src="<?php echo $this->config->item('HTTP_LISTING_MEDIA_IMAGE') . $product['listingid'] . '/' . $media->FileName . '-270x200' . $media->FileExtension; ?>"
				alt="" style="height: 50px; width: 50px"> </a> <?php } else { ?> <img
				src="<?php echo $this->config->item('HTTP_IMAGE'); ?>tmp/no-image.png"
				alt=""> <?php } ?></td>
			<td><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></td>
			<td><?php echo $product['price'] . ' ' . $product['priceUnit']; ?></td>
			<td><?php echo $product['size'] . ' ' . $product['sizeUnit']; ?></td>
			<td>
			<div class="btn-group"><a href="<?php echo $product['remove']; ?>"
				class="btn btn-mini" title="Delete"><i class="icon-trash"></i></a></div>
			</td>
			<td>
				<div class="social">
					<div class="review">
						<div class="share"><!-- AddThis Button BEGIN -->
							<div class="addthis_default_style">
								<a class="addthis_button_facebook"
							        addthis:url="<?php echo $product['href']; ?>"
							        addthis:title="<?php echo $product['name']; ?>"
							        addthis:description="<?php echo $product['name']; ?>"></a> 
								<a class="addthis_button_twitter"
									addthis:url="<?php echo $product['href']; ?>"
							        addthis:title="<?php echo $product['name']; ?>"
							        addthis:description="<?php echo $product['name']; ?>">
								</a>
								<a class="addthis_button_email"
									addthis:url="<?php echo $product['href']; ?>"
							        addthis:title="<?php echo $product['name']; ?>"
							        addthis:description="<?php echo $product['name']; ?>">
								</a>
							</div>
							<script type="text/javascript"
								src="//s7.addthis.com/js/250/addthis_widget.js">
							</script> <!-- AddThis Button END -->
						</div>
					</div>
				</div>
			</td>
		</tr>
		<?php } ?>
	</tbody>
</table>
<div class="w-box-content-2">
<h3>Would you like to save your shortlist for future visits?</h3>
<button type="submit" class="btn btn-primary btn-large save-short-list">Save</button>
</div>
		<?php } else { ?>
<div class="w-box-content-2">
<h3>Your short list is empty.</h3>
</div>
		<?php } ?></div>
</div>
</div>
</div>
<div class="sidebar span3"><?php $this->load->view('helpers/widgets/ad.php'); ?>
</div>
</div>
</div>
</div>
